@  3&-#books!topics.topic MM(books.dbfbook_idbookauth.dbfbookauthor*topics.dbftopic_id)8Author ID newid("authors")8First Name8Last Name 8Notes6&-#books!topics.topic_id MI%8Book ID newid("BOOKS") 8Title8Topic ID8Copyright Year 8ISBN8Publisher8Purchase Price8Cover Type8Date Purchased 8Pages 8Notes'8Topic ID newid("TOPICS") 8Topic2&-#books!books.notes MM2&-#books!books.pages MI8Book ID8Author ID1 author_idauthorsauthor_idA&-(#"books!titles by author".notes_b MDC&-&#"books!titles by author".pages MC(30)H&-/#"books!titles by author".date_purchased MYG&-*#"books!titles by author".covertype MC(50)L&-/#"books!titles by author".purchase_price MC(50)H&-/#"books!titles by author".publisher_name MI50)E&-,#"books!titles by author".isbn_number MI;&-"#books!books.date_purchased MD:&-#books!books.covertype MC(30);&-"#books!books.purchase_price MY?&-"#books!books.publisher_name MC(50),authors.dbfauthor_idnewau<&-#books!books.isbn_number MC(50);&-"#books!books.copyright_year MI:&-#books!authors.address MC(30)L&-/#"books!titles by author".copyright_year MC(50)B&-)#"books!titles by author".topic_id MIC&-&#"books!titles by author".title MC(20)MDE&-(#"books!titles by author".book_id MC(17))C&-&#"books!titles by author".email MC(17)MYA&-$#"books!titles by author".fax MC(10)MC(50)B&-&#"books!titles by author".phone MC(2)C(50)A&-$#"books!titles by author".zip MC(25)MIC&-&#"books!titles by author".state MC(30)>&-%#"books!titles by author".city MM50)E&-(#"books!titles by author".address MC(50)auto_ids.dbfE&-(#"books!titles by author".notes_a MC(50)C&-*#"books!titles by author".last_name MI50)H&-+#"books!titles by author".first_name MC(50)C&-*#"books!titles by author".author_id MIJ.0$(,PQR / %d '-+"books!titles by author",books!topics*SELECT * FROM books!topics INNER JOIN "books!titles by author" Titles_by_author ON Titles_by_author.topic_id = Topics.topic_id ORDER BY Topics.topic) 5&-#books!books.topic_id MI6&-#books!books.title MC(50)4&-#books!books.book_id MI30)8&-#books!authors.email MC(20)6&-#books!authors.fax MC(17)8&-#books!authors.phone MC(17)6&-#books!authors.zip MC(10)7&-#books!authors.state MC(2)7&-#books!authors.city MC(25)4&-#books!authors.notes MM<&-#books!authors.last_name MC(50)=&- #books!authors.first_name MC(50)8&-#books!authors.author_id MI. topic_idtopicstopic_idFUNCTION NewID(tcAlias) LOCAL lcAlias, ; lnID, ; lcOldReprocess, ; lnOldArea lnOldArea = SELECT() lnID = 0 IF PARAMETERS() < 1 lcAlias = UPPER(ALIAS()) ELSE lcAlias = UPPER(tcAlias) ENDIF lcOldReprocess = SET('REPROCESS') *-- Lock until user presses Esc SET REPROCESS TO AUTOMATIC IF !USED("AUTO_IDS") USE books!auto_ids IN 0 ENDIF SELECT auto_ids IF SEEK(lcAlias, "auto_ids", "table") IF RLOCK() lnID = auto_ids.id REPLACE auto_ids.id WITH auto_ids.id + 1 UNLOCK ENDIF ENDIF SELECT (lnOldArea) SET REPROCESS TO lcOldReprocess RETURN lnID ENDFUNC i PPR%UJ TCW T%C QTCCfhTCfTC REPROCESSvGM(%CAUTO_IDS Qbooks!auto_idsF"%Cauto_idstable% %CS!T>Z F GM( BUTCALIASLCALIASLNIDLCOLDREPROCESS LNOLDAREABOOKSAUTO_IDSIDNewID,1q4AsAq"qAAA1)P+ book_id booksbook_id.0$(,PQR / %d '!+books!authors,books!books*SELECT Authors.*, Books.* FROM books!authors INNER JOIN books!bookauth INNER JOIN books!books ON Books.book_id = Bookauth.book_id ON Authors.author_id = Bookauth.author_id ORDER BY Authors.last_name, Authors.first_name)